<include file="inc:header" />
<div class="page" id='{$data.act}'>
<include file="inc:title" />
<div class="content register_login_content" style="    position: absolute;">


<!-- 这里是页面内容区 -->


<div class="bg-img" style="background: url(./public/images/y-11.png) no-repeat;width:100%;height:100%;background-size:100% 100%">
	<div style="width:110px;margin:0 auto;padding-top:130px">
	<img src="./public/images/y-22.png" alt="" style="width:100%">
	</div> 
	
	<form>
	<input type="text"      id="email"       style="border:4px solid;border-radius:15px;width:50%;height:29px;line-height:29px;margin-left:25%;background:none;padding-left:50px;margin-top:40px;" placeholder="账号">
	
	
	<input type="password"  id="pwd" style="border:4px solid;border-radius:15px;width:50%;height:29px;line-height:29px;margin-left:25%;margin-top:16px;background:none;padding-left:50px" placeholder="密码">
	
	
		<div class="register_login_pd" id="login">
			<input style="display:block;border-radius:15px;border:0;width:40%;margin-left:30%;margin-top:26px;background-color:#56b1ea;color:#fff;height:29px;line-height:29px;text-align:center;font-size:18px" class="ui-button_login r_l_but" type="button" onclick="do_login();" value="登录账户"/>
			<div class="clearfix">
				<a  style="color:#fff;font-size:14px;position:absolute;left:30%" class="f_l    ea544a"    href="#" onclick="RouterURL('{:U('index/saveresetpwd')}')">忘记密码？</a>
				<a  style="color:#fff;font-size:14px;position:absolute;right:30%" class="f_r c56b1ea"    href="#" onclick="RouterURL('{:U('index/register'),'#register'}')">注册账号</a>
			</div>
		</div>	
		</form>
</div>
<script>
	function do_login(){
		var email_val=$.trim($("#email").val());
		var pwd=$.trim($("#pwd").val());
		if(!email_val)
		{
			$.toast("请填写用户名");
			return false;
		}
		if(!pwd)
		{
			$.toast("请填写密码");
			return false;
		}
		var ajaxurl = SITE_DOMAIN + '/index.php?m=Home&c=Uccenter&a=login';
		var query = newObject();
		query.email = email_val;
		query.pwd = pwd;
		query.post_type = "json";

		$.showIndicator();
		$.ajax({
			url:ajaxurl,
			data:query,
			type:"POST",
			dataType:"json",
			success:function(data){
				$.hideIndicator();
				$.toast(data.show_err);
				if(data.user_login_status == 1)
				{

					if(document.referrer.indexOf("login_out") > 0 || document.referrer.indexOf("register") > 0 ){
						//RouterURL(SITE_DOMAIN+'/index.php?m=Home&c=index&a=index','#index',2);
					}else{
                        RouterURL(SITE_DOMAIN+'/index.php?m=Home&c=index&a=index','#Index',2);
						//location.replace(document.referrer);
					}
				}
			}
			,error:function(){
				$.hideIndicator();
				$.toast("通信失败");
			}
		});


	}
</script>
<include file="inc:footer" />








